package boxing;

public class Test2 {
    public static void main(String[] args) {
        Integer a = 127;
        Integer b = 127;
        System.out.println(a == b);//true

        Integer c = 128;
        Integer d = 128;
        System.out.println(c == d);//false
    }
//JVM针对Integer这个常量池做了优化,-128 -> 127这个范围内的数字,Integer提前创建好,放到了常量池中
//可能会随JVM的版本改变而发生改变
}
